﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ESHOP.Domain;
using ESHOP.DAO;
using ESHOP.UTIL;

namespace E_Shop
{
    public partial class _Default : System.Web.UI.Page
    {
        private BuyLeadDAO _buyleadDao = new BuyLeadDAO();
        private SellLeadDao _selleadDao = new SellLeadDao();
        private SanPhamDAO _sanphamDao = new SanPhamDAO();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                var buylists = _buyleadDao.GetAll();
                var sellists = _selleadDao.GetList();
                Leadrepeat.DataSource = buylists;
                Leadrepeat.DataBind();
                Sellrepeat.DataSource = sellists;
                Sellrepeat.DataBind();
                var SpNewList = _sanphamDao.Getlimit();

                DataListSanPham.DataSource = SpNewList;
                DataListSanPham.DataBind();

            }
        }
    }
}
